package com.example.ai_basedintelligentdiagnosisandtreatmentofchildren.utils;

import androidx.annotation.StringRes;

public class ValidationResult {
    private final Integer errorResId;
    private final boolean valid;

    public ValidationResult(boolean valid,Integer errorResId) {
        this.errorResId = errorResId;
        this.valid = valid;
    }

    public static ValidationResult valid() {
        return new ValidationResult(true,null);
    }

    public static ValidationResult invalid(@StringRes int errorResId) {
        return new ValidationResult(false,errorResId);
    }

    // Getters
    public Integer getErrorResId() { return errorResId; }
    public boolean isValid() { return valid; }
}